@charset "UTF-8";

.#{$ns-comp}input-group {
	display: table;
	width: 100%;
	border-collapse: separate;  // 防止边框线溢出

	> .#{$ns-obj}input-addon,
	> .#{$ns-comp}btn-group,
	> .#{$ns-obj}input {
		display: table-cell;
		vertical-align: middle;
		width: 1%;
	}

	/* 按钮组 */
	> .#{$ns-comp}btn-group:first-child {
		> .#{$ns-obj}btn:last-child {
			@include buildRadius(right, 0);
		}
	}
	> .#{$ns-comp}btn-group:last-child {
		> .#{$ns-obj}btn:first-child {
			@include buildRadius(left, 0);
		}
	}

	/* 输入框 */
	> .#{$ns-obj}input {
		width: 100%;
		border-radius: 0;

		&:first-child {
			@include buildRadius(left, $input-radius);
		}

		&:last-child {
			@include buildRadius(right, $input-radius);
		}
	}
}

.#{$ns-obj}input-addon {
	padding: 0 $input-pd-lr;
	line-height: 1;
	text-align: center;
	white-space: nowrap;

	color: $normal-black;
	background-color: $color-thead;
	border: 1px solid $gray;
	border-radius: 0;

	> [class^="icon-"] {font-size: 16px;}

	> .#{$ns-obj}checkbox,
	> .#{$ns-obj}radio {
		margin-right: -$input-checkbox-text-space;
		line-height: 1;  /* 防止撑开边框 */
	}

	&:first-child {
		border-right: 0;
		@include buildRadius(left, $input-radius);
	}

	&:last-child {
		border-left: 0;
		@include buildRadius(right, $input-radius);
	}
}
